package com.love.poetry.application.poetry.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.love.poetry.application.poetry.VerseService;
import com.love.poetry.domain.poetry.Verse;
import com.love.poetry.infrastructure.persist.poetry.VerseRepository;
import com.youboy.core.orm.Page;

@Transactional
@Service
public class VerseServiceImpl implements VerseService {

	@Autowired
	private VerseRepository verseRepository;

	public void save(Verse verse) {
		verseRepository.save(verse);
	}

	public void update(Verse verse) {
		verseRepository.update(verse);
	}

	public void delete(Verse verse) {
		verseRepository.delete(verse);
	}

	public void delete(String id) {
		verseRepository.delete(id);
	}

	public Verse get(String id) {
		return verseRepository.get(id);
	}

	public List<Verse> query(Object object) {
		return verseRepository.query(object);
	}

	public Page<Verse> queryPage(Page<Verse> page) {
		return verseRepository.queryPage(page);
	}
}